<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<title>Acount Model Config</title>
	
	<jsp:include page="/core/tool/resources.jsp?models=echarts"></jsp:include>
	<script src="./cmpreport.js"></script>
</head>
<body>

	<div id="toolbar">
	   <a class="easyui-linkbutton" iconCls="icon-reload" onclick="refresh()">刷新</a> 
       <a class="easyui-linkbutton" iconCls="icon-reload" onclick="refresh(true)">强制刷新</a>
    </div>
    <div style="height:5px"></div>
    
    <table id="acountChoose" class="easyui-datagrid" title="账户选择" style="margin-bottom:5px;width:100%;"
	            data-options="rownumbers:true, singleSelect:false, sortOrder:'asc', sortName:'acountId', remoteSort:false, collapsible:true">
        <thead>
            <tr>
           	 	<th data-options="field:'checked'" checkbox='true'>主键</th>
	            <th data-options="field:'acountId',width:80" sortable="true">账户ID</th>
                <th data-options="field:'acountName',width:100">账户名</th>
                <th data-options="field:'parentName', width:100">父账户</th>
                <th data-options="field:'modelCode', width:80">模型编码</th>
            	<th data-options="field:'modelName', width:100">模型名称</th>
                <th data-options="field:'acountDesc',width:300, editor:'textbox'">账户说明</th>
            </tr>
        </thead>
	</table>
	<div style="height:5px"></div>
	
	<table id="modelconfig" class="easyui-edatagrid"  title="策略配置" style="margin-bottom:5px;width:100%;"
           data-options="editing:false, sortOrder:'asc', sortName:'acountId', rownumbers:true, singleSelect:true, collapsible:true">
        <thead>
            <tr>
            	<th data-options="field:'acountId', width:60, sortable:true">账户ID</th>
            	<th data-options="field:'acountName', width:100">账户名</th>
            	<th data-options="field:'modelName', width:100">模型名称</th>
            	<th data-options="field:'startDate', width:80, formconfig:{type:'datebox'}">开始日期</th>
            	<th data-options="field:'reportDateX', width:80, formconfig:{type:'datebox'}">报告日期</th>
            	<th data-options="field:'testIntennal', width:60">回测周期</th>
            	<th data-options="field:'secList', width:200">股票列表</th>
            </tr>
        </thead>
    </table>
	<div style="height:5px"></div>
		
	<table id="risk" class="easyui-edatagrid"  title="风险分析"  style="margin-bottom:5px;width:100%;" 
           data-options="editing:false, sortOrder:'asc', sortName:'acountId',remoteSort:false, rownumbers:true, singleSelect:true, collapsible:true">
        <thead>
            <tr>
            	<th data-options="field:'acountId', width:60, sortable:true">账户ID</th>
            	<th data-options="field:'acountName', width:100">账户名</th>
            	<th data-options="field:'profit', width:80, sortable:true, editor:{type:'numberbox',options:{precision:2, measure:'percent'}}">收益</th>
            	<th data-options="field:'baseProfit', width:80,sortable:true, editor:{type:'numberbox',options:{precision:2, measure:'percent'}}">基准收益</th>
            	<th data-options="field:'excessProfit', width:80, sortable:true, editor:{type:'numberbox',options:{precision:2, measure:'percent'}}">超额收益</th>
            	<th data-options="field:'profitYear', width:80, sortable:true, editor:{type:'numberbox',options:{precision:2, measure:'percent'}}">年化收益</th>
            	<th data-options="field:'volability', width:80, sortable:true, editor:{type:'numberbox',options:{precision:2, measure:'percent'}}">波动</th>
            	<th data-options="field:'volability12m', width:80, sortable:true, editor:{type:'numberbox',options:{precision:2, measure:'percent'}}">波动12M</th>
            	
            	
            	<th data-options="field:'alpha', width:80, sortable:true, editor:{type:'numberbox',options:{precision:2, measure:'percent'}}">阿尔法</th>
            	<th data-options="field:'alpha12m', width:80, sortable:true, editor:{type:'numberbox',options:{precision:2, measure:'percent'}}">阿尔法12M</th>
            	<th data-options="field:'beta', width:80, sortable:true, formconfig:{type:'numberbox',options:{precision:2}}">贝塔</th>
            	<th data-options="field:'beta12m', width:80, sortable:true, formconfig:{type:'numberbox',options:{precision:2}}">贝塔12M</th>
            </tr>
        </thead>
    </table>
	<div style="height:5px"></div>
	
	<div id="panel" class="easyui-panel" title="收益图" style="margin-bottom:5px;width:100%;" 	data-options="collapsible:true">
		<form id="requestForm" name="requestForm"  class="easyui-form">
			开始日期：<input class="easyui-datebox" name="beginDate" data-options="onSelect:changeBeginDate"/>
			<label><input name="beginDateType" type="radio" value="thisMonth"/>当月 </label> 
			<label><input name="beginDateType" type="radio" value="threeMonth"/>三月</label> 
			<label><input name="beginDateType" type="radio" value="thisYear"/>当年</label> 
			<label><input name="beginDateType" type="radio" value="all"/>全部 </label>
       	</form>
		 <div id="report1" style="width:1100px;height:500px;"></div>
	</div>

</body>
</html>